package com.dn.designpatterns.prototype;

/**
 * @program: designpatterns
 * @description: 菜鸟
 * @author: DN
 * @create: 2021-03-28 17:41
 **/
public class PrototypePatterDemo {
    public static void main(String[] args) {
        ShapeCache.loadCache();

        Shape clonedShape = ShapeCache.getShape("1");
        System.out.println("Shape : " + clonedShape.getType());

        Shape clonedShape2 = ShapeCache.getShape("2");
        System.out.println("Shape : " + clonedShape2.getType());

        Shape clonedShape3 = ShapeCache.getShape("3");
        System.out.println("Shape : " + clonedShape3.getType());
    }
}
